//
//  BarButMy.m
//  Gunz
//
//  Created by Joggy on 16/4/13.
//  Copyright © 2016年 NUPT. All rights reserved.
//

#import "BarButMy.h"
#import "GZConst.h"

@implementation BarButMy

-(instancetype)init {
    self = [super initWithFrame:CGRectMake(0, [GZConst getScreenHeight] - 64 - 56, [GZConst getScreenWidth], 56)];
    self.backgroundColor = [UIColor colorWithRed:0.992 green:0.992 blue:0.992 alpha:1];
    _giveUpBut = [UIButton buttonWithType:UIButtonTypeSystem];
    _giveUpBut.frame = CGRectMake(0, 0, 135*proportion, 38);
    _giveUpBut.layer.position = CGPointMake(self.frame.size.width*0.26, 28);
    _giveUpBut.layer.cornerRadius = 6;
    _giveUpBut.layer.borderWidth = 1;
    _giveUpBut.layer.borderColor = CUSTOM_GREEN.CGColor;
    [_giveUpBut setAttributedTitle:[[NSAttributedString alloc] initWithString:@"放弃" attributes:@{NSForegroundColorAttributeName: CUSTOM_GREEN}] forState:UIControlStateNormal];
    [self addSubview:_giveUpBut];
    _alterBut = [UIButton buttonWithType:UIButtonTypeSystem];
    _alterBut.frame = CGRectMake(0, 0, 135*proportion, 38);
    _alterBut.layer.position = CGPointMake(self.frame.size.width*0.74, 28);
    _alterBut.layer.cornerRadius = 6;
    _alterBut.backgroundColor = CUSTOM_GREEN;
    [_alterBut setAttributedTitle:[[NSAttributedString alloc] initWithString:@"修改" attributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}] forState:UIControlStateNormal];
    [self addSubview:_alterBut];
    return self;
}

@end
